AppleScript Commands
AppleScript commands are commands that are built into the AppleScript language. They act on values in scripts. The target of an AppleScript command is a value in the current script, which is usually specified in the direct parameter of the command.There are only five AppleScript commands: Copy, Count, Get, Run, and Set. All of these commands can also function as application commands. For the Count, Get, Run, and Set commands, if the direct parameter is a value, then the command functions as an AppleScript command. If the direct parameter is an application object, the command functions as an application command.
For example, this Count command functions as an AppleScript command because the direct parameter is a value (a list):
count {"How", "many", "items", "in", "this", "list"}This Count command functions as an application command because the direct parameter is an application object:
count words in paragraph 1 of front document of ÿ application "Scriptable Text Editor"For the Copy command, if the value of theto
parameter is a reference to an application object, then the command functions as an application command. Otherwise, the command is an AppleScript command.For more examples of how to use Copy, Count, Get, Run, and Set, see the command definitions later in this chapter.